package com.situ.onlinebookstore.front.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;

@Controller
@RequestMapping("/user")
public class UserController {
    @GetMapping("/login")
    public String login(){
        return "user/login";
    }


    @GetMapping("logout")
    public String logout(HttpSession session){
        session.invalidate();
        return "redirect:/";
    }

    @GetMapping("center")
    public String center(){
        return "user/selfInformation";
    }

    @GetMapping("/account")
    public String account(){
        return "user/uc-account";
    }

    @GetMapping("/address")
    public String address(){
        return "user/uc-address";
    }

    @GetMapping("/verify")
    public String verify(){
        return "user/uc-verify";
    }




}
